#*******************************************************************
#* @ All Rights Reserved Copyright (C) 2014 broada,Co.,Ltd.        *
#*                                                                 *
#*  NOTE      = apm提供共享内存的通用模块
#*  DATE      = 
#*******************************************************************

#共通参数
include         ../apmmodule/Makefile_comm.mk

AR              = ar

INCLUDES        =  -I. -I$(LIB_I_APM_COMM)
LIBS            = -lzlog -lpthread
CFLAGS          = -fPIC

CFLAGS          += $(CFLAGS_EXT)
CFLAGS          += $(CFLAGS_UTEST)

LIBS            += $(LIBS_EXT)

MK_LIB_PATH     =$(COMM_DIST_DIR_LUALIB)
TARGET_LIB      =$(TARGET_LIB_APMSHM)

SRC_LIB  = $(wildcard *.c)
OBJS_LIB = $(patsubst %.c, %.o, $(SRC_LIB))

all: $(TARGET_LIB)

.c.o:$(OBJS_LIB)
	$(CX) -c $(CFLAGS) $(INCLUDES)  $<

$(TARGET_LIB): $(OBJS_LIB)
	@$(AR) crv $@  $^
	@ranlib $@
	@rm -f *.o

install:
	mkdir -p $(COMM_DIST_DIR_DEV_SO);mkdir -p $(LIB_I_APM_SHM);
	cp $(TARGET_LIB) $(COMM_DIST_DIR_DEV_SO)/.
	cp *.h $(LIB_I_APM_SHM)

uninstall:
	rm -rf $(LIB_A_APM_SHM)

clean:
	rm -f *.o *.a;

#EOF

